import grails.converters.*

class RentController {

    def listRented = {
 	render(view:'list',model:[ rentInstanceList: Rent.findAllRented() ])
    }

    def listReturnedBooks = {
 	render(view:'list',model:[ rentInstanceList: Rent.findAllReturned() ])
    }

    def returnBook = {
	Rent rent = Rent.findById(params.id)
	rent.returnBook()
        redirect(action:listRented)
    }

   def scaffold = true

}
